<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let s1 = Symbol('foo');
    s2 = Symbol('bar');
    let o = {
      [s1]: 'foo val',
      [s2]: 'bar val',
      baz: 'baz val',
      qux: 'qux val'
    }
    // const allSymblKey = Object.getOwnPropertySymbols(o);
    // const allSymblKey = Object.getOwnPropertyDescriptors(o)
    // const allSymblKey = Reflect.ownKeys(o)
    const findKey = Object.getOwnPropertySymbols(o).find(item => item.toString().match(/foo/))
    console.log(findKey)
  </script>
</body>

</html>